//////////////////////////////////////////////////////////////////////////
#ifndef _CMSGLIST_H_
#define _CMSGLIST_H_
#pragma once

////////////////////////////////////////////////////////
//CMsgList
class CMsgList : public CListCtrl
{
// Construction
public:
	CMsgList();
// Attributes
public:
//	CPWARNArray m_warnPtrArray ;
	COLORREF m_clrBrush;
// Operations
public:

// Overrides
protected:
	static LPCTSTR MakeShortString(CDC* pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMsgList)
	protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL
// Implementation
public:
	virtual ~CMsgList();
	// Generated message map functions
protected:
	//{{AFX_MSG(CMsgList)
	afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMsgClear();
	afx_msg void OnMsgExport();
	afx_msg void OnUpdateMsgClear(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMsgExport(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////
//CSortClass
class CSortClass
{
public:
	CSortClass(CListCtrl * _pWnd, const int _iCol, const bool _bIsNumeric);
	//CSortClass(CListCtrl * _pWnd, const int _iCol, const bool _bIsNumeric, int iStartingItem, int iEndingItem );
	virtual ~CSortClass();		
	int iCol;	
	int m_iStartingItem;
	int m_iEndingItem;
	CListCtrl * pWnd;	
	bool bIsNumeric;
	void Sort(const bool bAsc);	
	static int CALLBACK CompareAsc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareDes(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareAscI(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareDesI(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
public:	
	class CSortItem	
	{	
		public:		
			virtual  ~CSortItem();
			CSortItem(const DWORD _dw, const CString &_txt);		
			CString txt;		
			DWORD dw;	
	};
	class CSortItemInt	
	{	
		public:
			CSortItemInt(const DWORD _dw, const CString &_txt);		
			int iInt ;		
			DWORD dw;	
	};
};

#include "..\GUILIBINCLUDE\guicontrolbar.h"
#include "..\GUILIBINCLUDE\GuiTabWnd.h"
class CStatusOutPut :	public CGuiControlBar
{
protected:
	CGuiTabWnd	m_TabSolExplorer;
public:
	CMsgList   m_ListTask;
	BOOL SetColumnsName();
	BOOL AddColumnsInfo(CString msgType,CString MsgName,CString msgRemark);
	CImageList *m_pimagelistSmall;
	int m_totalMsg;
public:
	CEdit		m_EditOutput;
	CEdit		m_EditFind;
	CEdit		m_EditFind1;
public:
	CStatusOutPut(void);
	virtual ~CStatusOutPut(void);
	virtual void StyleDispl(DWORD dwDsp=GUISTYLE_XP)
	{
		m_StyleDisplay=dwDsp;
		CGuiControlBar::StyleDispl(dwDsp);
		return ;
		m_TabSolExplorer.StyleDispl(dwDsp);
		
	}
protected:
	//{{AFX_MSG(CStatusOutPut)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
#endif // _CMSGLIST_H_
